// 用户求职路线面板组件

// base
require("../../both/base.js");

// css
require("./UserWayPanel.scss");

// code
class UserWayPanel extends React.Component{
    constructor(props){
        super(props);
    }

    render(){
        var href = this.props.href;
        const badgeList = this.props.badge.map((ele,idx) =>
            <a href="#" key={idx.toString()}><span className="way_badge_item">{ele}</span></a>
        );

        return (
            <div className="user_way_panel bln">
                <div className="way_cover_cr">
                    <a href={href}>
                        <img className="way_cover" src={this.props.imageSrc} alt="封面"/>
                    </a>
                </div>
                <div className="way_info">
                    <a href={href}>
                        <div className="way_title">
                            {this.props.title}
                        </div>
                    </a>
                    <div className="way_badge">
                        {badgeList}
                    </div>
                    <div className="way_course_state">
                        <a href={href}><span className="way_course_state_item">{this.props.courseNumber}门课程</span></a>
                        <a href={href}><span className="way_course_state_item">{this.props.studentNumber}人学习</span></a>
                    </div>
                </div>
            </div>
        )
    }
}

export default UserWayPanel;